package pojo;

/**
 * Created by abcdi on 2017/2/8.
 */
public class UserWithStatus extends User {
    private String mailStatus;

    public String getMailStatus() {
        if (getHasvalidate()) {
            return "已验证";
        } else {
            return "未验证";
        }
    }

    public void setMailStatus(String mailStatus) {

    }

    public String getMail() {
        return super.getMail() == null ? "" : super.getMail();
    }

    public String getPasswordMail() {
        if (getHasvalidate()) {
            return getMail().charAt(0) + getMail().replaceAll(".", "*").substring(1, getMail().indexOf("@")) + getMail().substring(getMail().indexOf("@"));
        } else {
            return "";
        }
    }
}
